import numpy as np

import paddle.fluid as fluid
import paddle.fluid.layers as L

from helm.static.models.cifar import PyramidNet2

fluid.enable_imperative()

net = PyramidNet2(32, 480-32, 56, 16, False)
net.set_dict(fluid.load_dygraph("/Users/hrvvi/Downloads/epoch_300.pdparams")[0])

l = net.features.stage2.unit2.branch1.bn2
mean = l._mean.numpy()
std = np.sqrt(l._variance.numpy() + 1e-5)
scale = l.weight.numpy()
offset = l.bias.numpy()